#include "struct.h"
#include "function.h"

/**
 * @brief 初始化链表
 * 
 * @return p_node 返回链表的地址
 */

p_node init_func()
{
    //为头节点申请堆空间
    p_node head = calloc(1, sizeof(node_t));
    //判断头节点申请是否成功
    if(head == NULL)
    {
        printf("头节点申请失败\n");
        return NULL;
    }

    head->next = NULL;
    head->prev = NULL;
    head->count = 0; 
    //printf("头节点申请成功\n");       //用于测试

    return head;
}